#include <iostream>
#include "vectorfunctions.h"
#include <cmath>

int max_abs_diff(int x[], int l)
{	
	int i,diff=0, d;
	for(i=1;i<l;++i)
		if(abs(x[i]-x[i-1])>diff)
			diff=abs(x[i]-x[i-1]);
return diff;			
}

int main()
{
	int l, diff;
	int x[100];
	cout<<"Length of array : ";
	cin>>l;
	readVector(x, l);
	printVector(x, l);
	diff =max_abs_diff(x, l);
	cout<<diff<<"\n";
	
return 0;
}
